#!/bin/bash
#*/1 * * * * root /opt/fonsview/3RD/node_exporter/textfile_scripts/runner node_system_corefile_file

VALUE=`ls / | grep -c core`
if [ ! $VALUE ]; then
    echo "# HELP node_system_corefile 存在core文件"
    echo "# TYPE node_system_corefile gauge"
    echo "node_system_corefile{method=\"file\"} 0"
else
    echo "# HELP node_system_corefile 存在core文件"
    echo "# TYPE node_system_corefile gauge"
    echo "node_system_corefile{method=\"file\"} ${VALUE}"
fi 

